package com.groupbuying.orderproducer.dao;

import com.groupbuying.orderproducer.domain.CommodityOrderItemDO;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * 商品订单项目表(子表)
 * @author vincentxin
 * @email vincentxin@aliyun.com
 * @date 2019-09-20 15:12:35
 * @des
 */

@Mapper
@Repository
public interface CommodityOrderItemDao {

	CommodityOrderItemDO get(String id);
	
	List<CommodityOrderItemDO> list(Map<String, Object> map);
	
	int count(Map<String, Object> map);
	
	int save(CommodityOrderItemDO commodityOrderItem);
	
	int update(CommodityOrderItemDO commodityOrderItem);
	
	int remove(String id);
	
	int batchRemove(String[] ids);

	/**
	 * 用订单id修改子订单
	 * @param map
	 */
	void updateById(Map<String, Object> map);

	/**
	 * 用主订单id修改订单
	 * @param map
	 */
	void updateByOrderId(Map<String, Object> map);

	/**
	 * 查询当前查询状态的其他状态数据存在数量
	 */
	int findOtherStateCount(Map<String, Object> map);
}
